import request from '@/utils/request'

export function copy(data) {
  return request({
    url: 'api/periodJob/copy',
    method: 'put',
    data
  })
}

export function del(data) {
  return request({
    url: 'api/periodJob',
    method: 'delete',
    data
  })
}

export function getJobDetailByPkId(pkId) {
  return request({
    url: 'api/periodJob/jobInfoDetail?pkId=' + pkId,
    method: 'get'
  })
}

export function batchChangeStatus(data) {
  return request({
    url: 'api/periodJob/batchChangeStatus',
    method: 'post',
    data
  })
}

export function batchChangeBizDate(data) {
  return request({
    url: 'api/periodJob/batchChangeBizDate',
    method: 'post',
    data
  })
}

export function runAgainOne(data) {
  return request({
    url: 'api/periodJob/runAgainOne',
    method: 'post',
    data
  })
}

export function chasingData(data) {
  return request({
    url: 'api/periodJob/chasingData',
    method: 'put',
    data
  })
}

export default {
  del,
  copy,
  batchChangeStatus,
  batchChangeBizDate,
  getJobDetailByPkId,
  runAgainOne,
  chasingData
}
